/*
	The Raja Toolkit.
	Copyright (C) 2011 Raja-Toolkit Foundation

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 3.0 of the License, or (at your option) any later version.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include "../program.hpp"
#include "../vertex_buffer.hpp"

#include "gles2_internal.hpp"



#include <iostream>
#include <fstream>

#include <cstring>

using namespace std;
using namespace raja;
using namespace raja::math;

namespace raja
{
namespace render
{

vertex_array::vertex_array(const vertex_declaration &decl, uint32 count) : __decl(decl)
{	_type	= resource::RT_VERTEX;
	_id		= 0;
	_usage	= resource::UT_DYNAMIC_SYS;
	__array	= new element_array(decl.get_vertex_size());
	__array->resize(count);
}

vertex_array::~vertex_array()
{
	std::cout << "~vertex_array(" << __array->get_count() << ")" << std::endl;
	delete __array;
}


}	// namespace render
}	// namespace raja
